﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt
{
	// Token: 0x02000084 RID: 132
	public class TAlterTriggerStmt : TCustomSqlStatement
	{
		// Token: 0x06000344 RID: 836 RVA: 0x002F9AB0 File Offset: 0x002F7CB0
		public TAlterTriggerStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstaltertrigger;
		}

		// Token: 0x17000052 RID: 82
		// (get) Token: 0x06000345 RID: 837 RVA: 0x002F9AC1 File Offset: 0x002F7CC1
		// (set) Token: 0x06000346 RID: 838 RVA: 0x002F9AC9 File Offset: 0x002F7CC9
		public virtual TObjectName TriggerName
		{
			get
			{
				return this.triggerName;
			}
			set
			{
				this.triggerName = value;
			}
		}

		// Token: 0x17000053 RID: 83
		// (get) Token: 0x06000347 RID: 839 RVA: 0x002F9AD2 File Offset: 0x002F7CD2
		// (set) Token: 0x06000348 RID: 840 RVA: 0x002F9ADA File Offset: 0x002F7CDA
		public virtual TObjectName NewTriggerName
		{
			get
			{
				return this.newTriggerName;
			}
			set
			{
				this.newTriggerName = value;
			}
		}

		// Token: 0x17000054 RID: 84
		// (get) Token: 0x06000349 RID: 841 RVA: 0x002F9AE3 File Offset: 0x002F7CE3
		// (set) Token: 0x0600034A RID: 842 RVA: 0x002F9AEB File Offset: 0x002F7CEB
		public virtual EAlterTriggerOption AlterTriggerOption
		{
			get
			{
				return this.alterTriggerOption;
			}
			set
			{
				this.alterTriggerOption = value;
			}
		}

		// Token: 0x0600034B RID: 843 RVA: 0x002F9AF4 File Offset: 0x002F7CF4
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TAlterTriggerSqlNode talterTriggerSqlNode = (TAlterTriggerSqlNode)this.rootNode;
			this.alterTriggerOption = talterTriggerSqlNode.AlterTriggerOption;
			this.triggerName = talterTriggerSqlNode.TriggerName;
			base.DatabaseObjects.Add(this.triggerName);
			this.newTriggerName = talterTriggerSqlNode.NewTriggerName;
			return 0;
		}

		// Token: 0x0600034C RID: 844 RVA: 0x002F9B55 File Offset: 0x002F7D55
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0600034D RID: 845 RVA: 0x002F9B65 File Offset: 0x002F7D65
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x040010A2 RID: 4258
		private TObjectName triggerName;

		// Token: 0x040010A3 RID: 4259
		private TObjectName newTriggerName;

		// Token: 0x040010A4 RID: 4260
		private EAlterTriggerOption alterTriggerOption;
	}
}
